package com.paranoidmonkey.ode.Joint;

import com.paranoidmonkey.ode.AndrODE;
import com.paranoidmonkey.ode.Vector3;

public class JointFeedback {
	protected long handle;
	
	protected JointFeedback(long id){
		handle=id;
	}
	
	public void set(Vector3 f1,Vector3 f2,Vector3 t1,Vector3 t2){
		AndrODE.setFeedback(handle,f1.data,f2.data,t1.data,t2.data);
	}
	
	public Vector3[] get(){
		float[] fret=AndrODE.getFeedback(handle);
		Vector3[] ret=new Vector3[4];
		
		ret[0]=new Vector3(fret[0],fret[1],fret[2]);
		ret[1]=new Vector3(fret[3],fret[4],fret[5]);
		ret[2]=new Vector3(fret[6],fret[7],fret[8]);
		ret[3]=new Vector3(fret[9],fret[10],fret[11]);
		
		return ret;
	}
}
